package com.knowif.enumInfo;

/**
 * @author xingyao
 * @Description: 红包状态枚举
 */
public enum RedPacketEnum {
	
	//已经被删除
	DELETE(1),
	
	//未达到使用标准
	NOTQUALIFIED(3),
	
	//过期
	PASTTIME(4),
	
	//可用
	OK(5),
	
	//已用
	USED(2);
	
	private RedPacketEnum(int status) {
		this.status = status;
	}

	private int status;

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断红包状态是否是删除
	 * @param delete
	 * @return
	 */
	public static boolean isDelete(Integer status){
		if(RedPacketEnum.DELETE.getStatus() == status){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断红包是否是过期
	 * @param delete
	 * @return
	 */
	public static boolean isPastTime(Integer status){
		if(RedPacketEnum.PASTTIME.getStatus() == status){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断红包是否是未达到使用标准
	 * @param delete
	 * @return
	 */
	public static boolean isNotQualified(Integer status){
		if(RedPacketEnum.NOTQUALIFIED.getStatus() == status){
			return true;
		}else{
			return false;
		}
	}
	
	
	/**
	 * @author: xingyao 
	 * @Description:  判断红包是否可用
	 * @param delete
	 * @return
	 */
	public static boolean isOK(Integer status){
		if(RedPacketEnum.OK.getStatus() == status){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断红包是否是可用
	 * @param status
	 * @return
	 */
	public static boolean isUsed(Integer status){
		if(RedPacketEnum.USED.getStatus() == status){
			return true;
		}else{
			return false;
		}
	}

}
